package com.imddy.spbatch001.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class UuidUtils {
    private static final Logger log = LoggerFactory.getLogger(UuidUtils.class);

    public static String getUuid() {
        String uuid = java.util.UUID.randomUUID().toString();
        uuid = uuid.replace("-", "");
        return uuid;
    }

    public static String getUuid(int length) {
        String uuid = java.util.UUID.randomUUID().toString();
        uuid = uuid.replace("-", "");
        return uuid.substring(0, length);
    }

    public static String getUuid16() {
        return getUuid(16);
    }


}
